package com.crm.jdy.common.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.crm.jdy.common.vo.PageVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class PeoductInfoDto extends PageVO implements Serializable {

    private static final long serialVersionUID = 161634304L;

    @TableId(value = "pro_id", type = IdType.ID_WORKER_STR)
    @ApiModelProperty(name = "proId" , value = "产品主键id")
    private String proId;

    @NotBlank(message = "产品名字非空")
    @ApiModelProperty(name = "proName" , value = "产品名字")
    private String proName;

    @ApiModelProperty(name = "proType" , value = "产品类型")
    private String proType;

    @ApiModelProperty(name = "proCompany" , value = "产品公司")
    private String proCompany;

    @ApiModelProperty(name = "proPrice" , value = "价格")
    private BigDecimal proPrice;

    @ApiModelProperty(name = "proDesc" , value = "描述")
    private String proDesc;

    @ApiModelProperty(name = "proStatus" , value = "状态")
    private String proStatus;

    @ApiModelProperty(name = "proCharPerson" , value = "负责人")
    private String proCharPerson;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "createTime" , value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "updateTime" , value = "更新最新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @JsonIgnore
    @TableLogic
    @ApiModelProperty(name = "isDelete" , value = "0正常  1删除")
    private Integer isDelete;

    @ApiModelProperty(name = "proCrePerson" , value = "创建人")
    private String proCrePerson;

    @NotNull(message = "商品编码不能为空")
    @ApiModelProperty(name = "proNumber" , value = "编码")
    private String proNumber;


}
